import os
import tkinter as tk
import webbrowser
import requests
import tkinter.messagebox as mesbox
import PysimpleGUI as sg
from tkinter import ttk
from retrying import retry
class SetUI(object):
    # 音乐弹框界面28 28 1
    def __init__(self,weight=1000,height=600):
        self.ui_weight = weight
        self.ui_height = height
        self.title ="音乐破解软件"
        self.ui_root = tk.Tk(className=self.title)
        self.ui_url = tk.StringVar()
        self.ui_var = tk.IntVar()
        self.ui_var.set(1)
        self.show_result = None
        self.song_num = None
        self.response_data = None
        self.song_url = None
        self.song_name = None
        self.song_author = None

    def set_ui(self):
        '''
        设置前易UI界面
        '''
        # Frame空间
        frame_1 = tk.Frame(self.ui_root)
        frame_2 = tk.Frame(self.ui_root)
        frame_3 = tk.Frame(self.ui_root)
        frame_4 = tk.Frame(self.ui_root)
        # ui界面中菜单设计
        ui_menu = tk.Menu(self.ui_root)
    # self.ui_root.config(menu=ui_menu)
    # file_menu = tk.Menu(ui_menu, tearoff = 0)
    # ui_menu.add_cascade(label='浆单'，menu = file_menu)
    # file_menu.add_command(label='使用说册’,command=lambda: webbrowser .open( '
    # ww.baidu.com
    # ' )file_menu.add_command(label='
    # 关于作
    # ',command=lambda: webbrowser .open( '
    # www.baidu.com
    # ' ))file_menu.add command(label='
    # 退出
    # ',command=self.ui root.quit)
    # # 控件内容设置choice_passageway = tk.Label(frame_1,text='请选择音乐搜索通道:，padx=10，pady=10)passageway button_1 = tk,Radiobutton(frame_1, text='我', variable=self.ui_var, value=1, width=10, height=3)passageway button 2=tk.Radiobutton(frame 1, text='网易云',variable=self.ui var, value=2,width=10, height=3)passageway_button 3 = tk,Radiobutton(frame_1, text='00乐', variable=self.ui_var, value=3, width=10, height=3)passageway button4=tk.Radiobutton(frame_1,text='熊狗'variable=self.ui var,value=4,width=10,height=3)input link = tk.Label(frame_2，text="请输入歌曲名或歌手:"entry_style = tk,Entry(frame 2, textvariable=self.ui url, highlightcolor='fuchsia', highlightthickness=1,
    # wi鞅俗托箝従蘘刘魎伪h鱀耜甘35)